def calc_total(*nums):
    # nums.每天的运动数量
    return sum(nums)


def calc_avg(total, day=7):
    return total / day  # 计算平均值


def check_success(total, goal=120):
    if total > goal:
        return "挑战成功"  # 判断本次挑战是否成功
    else:
        return print("挑战失败")


def main(title, duration):
    print(f"{title}{duration}天挑战，请输入每天的数量")
    num1 = int(input("第1天"))
    num2 = int(input("第2天"))
    num3 = int(input("第3天"))
    num4 = int(input("第4天"))
    num5 = int(input("第5天"))
    num6 = int(input("第6天"))
    num7 = int(input("第7天"))
    # 总数
    total = calc_total(num1 + num2 + num3 + num4 + num5 + num6)
    # 平均值
    avg = calc_avg(total)

    result = check_success(total)


    print(f"健身总结总数是%d,平均值是%.1f，挑战结果是%s"%(total,avg,result))
main('仰卧起坐',7)